package com.freight.order.service;

import com.freight.core.base.FreightBaseService;
import com.freight.core.common.vo.SearchVo;
import com.freight.order.dto.OrderGoodsDto;
import com.freight.order.entity.OrderGoods;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * 货物续期需求接口
 * @author huyingtai
 */
public interface CompanyOrderGoodsService extends FreightBaseService<OrderGoods, Long> {

    /**
     * 发布货源需求
     * @return OrderGoods
     */
    String publis();

    /**
    * 多条件分页获取
    * @param orderGoods
    * @param searchVo
    * @param pageable
    * @return
    */
    Page<OrderGoods> findByCondition(OrderGoods orderGoods, SearchVo searchVo, Pageable pageable);
    /**
     * 发布货源需求
     * @param orderGoodsDto
     * @return OrderGoods
     */
    String publicGoods(OrderGoodsDto orderGoodsDto);
    /**
     * 发布货源需求
     * @param goodId
     * @return OrderGoods
     */
    String delGoods(Long goodId);
    /**
     * 修改货源状态
     * @param goodId
     * @return OrderGoods
     */
    String updateGoodsStatus(Long goodId, Integer status);
    /**
     * 删除货源列表
     * @param goodIds
     * @return
     */
    String delGoodsList(Long[] goodIds);
    /**
     * 获取货物
     * @param goodIds
     * @return
     */
    List<OrderGoods> getGoodsList(List<Long> goodIds);

    /**
     * 修改货源
     * @param orderGoodsDto
     * @param goodId
     * @return
     */
    String updateGoods(OrderGoodsDto orderGoodsDto, Long goodId);


}